//
// Created by Jisam on 13/10/2024 19:51.
// Solution of  a
#include <bits/stdc++.h>

#define  int long long
#define  endl "\n"
#define  all(x) (x).begin(),(x).end()
#define  pb push_back
using namespace std;


signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    string s;
    cin >> s;
    int n = s.size();
    if (s[n - 1] == s[n - 2] && n == 2) {
        cout << "Yes" << endl;

    } else {
        cout << "No" << endl;
    }

    return 0;
}